package com.yf.entity;


import lombok.Setter;
import lombok.Getter;
import java.io.Serializable;
import java.util.Date;

import java.math.BigDecimal;

/**
 * 聊天消息会话实体
 * 表名 msg_session
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Sat Oct 20 14:23:28 CST 2018
 */
@Setter
@Getter
public class MsgSessionEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    //ID
    private Long id;
    //会话ID
    private Long sessionId;
    //聊天对象ID
    private Long targetId;
    //ENUM-聊天类型:'单聊','群聊'
    private Integer chatType;
    //会话内容:'文本','图片','语音','视频'
    private String sessionText;
    //未读数
    private Long notReadCount;
    //会话时间
    private Long createTime;
    //最近消息ID
    private Long msgId;
    //ENUM-状态:'关闭','打开'
    private Integer status;

    public MsgSessionEntity(){

    }


    public MsgSessionEntity(Long sessionId, Long targetId, Integer chatType, String sessionText, Long createTime, Long msgId) {
        this.sessionId = sessionId;
        this.targetId = targetId;
        this.chatType = chatType;
        this.sessionText = sessionText;
        this.createTime = createTime;
        this.msgId = msgId;
        this.status = 1;
    }
}
